<meta charset="UTF-8">
<!-- 快速获取当前时间 -->
<h1>f12查看效果</h1>
<script src="./utils.js"></script>
<script>
console.log(format('YmdHis'))  //20211126 ...
console.log(format('Y-m-d H:i:s')) // 2021-11-26 ...
console.log(format('Y/m/d'))// 2021-11-26 
console.log(format('Y/m/d H:i:s'))
console.log(format('Y年m月d日 H:i:s'))
console.log(format('Y') )// 2021
console.log(format('m'))
console.log(format('d'))
console.log(format('H'))
console.log(format('i'))
console.log(format('s'))
</script>

<!--3 16进制色随机 -->
<h1 id="" style="">神龙教主</h1>
<script src="./utils.js"></script>
<script>
// document.querySelector('h1').id = 数据
// document.querySelector('h1').style = "css属性名:css属性值;..." 错误语法❌
// document.querySelector('h1').style.css属性名 = css属性值 ✅
document.querySelector('h1').style.background = randomColor()
</script>

<!-- 4刚刚多久之前 -->
<h2></h2>
<script src="./untils.js"></script>
<script>
    dateFormat('2022-4-11 22:10:10')
    document.querySelector('h2').innerText=result
</script>

<button id="bro">5获取当前浏览器内核</button>
<script src="./untils.js"></script>
<script>
    bro.onclick = function(){
        alert(myBrowser())
    }
 </script>



 <button id="pingtai"> 6获取当前浏览器设备平台</button>
 <script src="./untils.js"></script>
 <script>
     pingtai.onclick = function(){
         alert(plotForm())
     }
  </script>

<!-- 点击弹出当前浏览器内核  自动运行函数 -->
<button id="weixin">7获取当前浏览器是否为微信浏览器</button>
<script src="./untils.js"></script>
<script>
    weixin.onclick = function(){
   alert(isWeiXin())
    }
</script>

<!-- 封装getStyle方法返回标签样式 -->
<style>
    div {
        background:#000;
        color:#fff;
    }
</style>
    
<div style="width:100px;height:100px;">
        神龙教主🐲
</div>

<button id="yangshi">8获取getStyle方法返回标签样式</button>
<script src="./untils.js"></script>
<script>
    yangshi.onclick = function(){
       var result = getStyle(document.querySelector('div'), 'color')
       alert(result)
    }
</script>

<br>
<script src="./untils.js"></script>
<button onclick="alert(getParams('wd'))">9获取当前地址栏参数</button>

<br>
<script src="./utils.js"></script>
<button onclick="alert('设置aa成功',setcookie('aa','bb',20))">10设置cookie并存储</button>
<button onclick="alert(getcookie('aa'))">10.1查询cookie存储</button>
<button onclick="alert('删除aa成功',removecookie('aa'))">10.2删除cookie存储</button>


